package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.*;

import java.util.HashMap;

/**
 * 字典明细
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class SystemDictionaryItem {
    private Long id;

    private Long parentId;//字典目录的id

    private String title;//字典明细的标题

    private Integer sequence;//字典明细序号



    //返回 json格式的字符串
    public String getJson(){
        HashMap<Object, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("title",title);
        map.put("parentId",parentId);
        map.put("sequence",sequence);
        return JSON.toJSONString(map);
    }

}